Skip to content

Conversation

@jrjrguo
Copy link
Member

@jrjrguo jrjrguo commented Dec 2, 2025

Description

Update Azure-AI-Translation-Text to 2.0.0-beta.1. Compatible with latest Translator API 2025-10-01-preview.
The new API introduces breaking changes, supporting translation configurations with TranslationTarget and option to translate with LLM & SLM models, also removed features like sentence breaks and dictionaries.

https://learn.microsoft.com/en-us/azure/ai-services/translator/text-translation/preview/overview

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

com.azure:azure-ai-translation-text

@jrjrguo jrjrguo marked this pull request as ready for review December 3, 2025 04:01
@jrjrguo jrjrguo requested review from a team and MikeyMCZ as code owners December 3, 2025 04:01
Copilot AI review requested due to automatic review settings December 3, 2025 04:01
@jrjrguo
Copy link
Member Author

jrjrguo commented Dec 3, 2025

@Azure/dpg-devs for awareness

Copilot finished reviewing on behalf of jrjrguo December 3, 2025 04:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Azure AI Translation Text SDK from version 1.2.0-beta.1 to 2.0.0-beta.1, integrating support for the latest Azure Translator API version 2025-10-01-preview. The update introduces significant breaking changes including LLM model support for translation, adaptive custom translation capabilities, and removes deprecated features like dictionary lookups and sentence boundary detection.

Key Changes

  • Added support for LLM/SLM model-based translations with configuration options for tone, gender, and deployment names
  • Introduced TranslationTarget class to encapsulate translation configuration per target language
  • Renamed properties for consistency: TargetLanguageLanguage, ConfidenceScore
  • Removed dictionary operations, sentence boundary detection, and text alignment features
  • Updated API structure to use TranslateInputItem for per-item configuration

Reviewed changes

Copilot reviewed 66 out of 66 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pom.xml Updated version from 1.2.0-beta.1 to 2.0.0-beta.1
CHANGELOG.md Documented breaking changes and new features for v2.0.0-beta.1
TextTranslationServiceVersion.java Added V2025_10_01_PREVIEW enum value and updated default
TranslationText.java Renamed property, removed deprecated fields, added token metrics
TranslationTarget.java New class for per-target translation configuration including LLM options
TranslateInputItem.java New class for structured translation input with multi-target support
GetSupportedLanguagesResult.java Replaced dictionary property with models list
DetectedLanguage.java Renamed confidence property to score
TranslateTests.java Updated tests to use new API structure and removed deprecated tests
GetLanguagesTests.java Updated to use models instead of dictionary
test-resources.json Added AIServices resource with gpt-4o-mini deployment configuration
README.md Updated documentation removing deprecated features and updating examples
Multiple sample files Updated to demonstrate new API patterns
Deleted files Removed dictionary and sentence boundary related classes and tests

Copy link
Member

@weidongxu-microsoft weidongxu-microsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some spelling errors found by copilot.

We likely need the apiview to be reviewed by SDK architect, as most of the API is complately change in this version.

* Enum value 3.0.
*/
V3_0("3.0");
V3_0("3.0"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to customize this class, if 3.0 cannot be used in this new SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants